import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class AppTheme {
  /// 黑夜色主题
  static ThemeData darkTheme() {
    return ThemeData(
      useMaterial3: Platform.isAndroid,
      colorScheme: const ColorScheme.dark(),
    );
  }

  /// 亮色主题
  static ThemeData lightTheme() {
    SystemUiOverlayStyle overlayStyle = const SystemUiOverlayStyle(
        statusBarColor: Colors.transparent,
        statusBarBrightness: Brightness.light,
        statusBarIconBrightness: Brightness.dark);

    return ThemeData(
      appBarTheme: AppBarTheme(
        systemOverlayStyle: overlayStyle,
      ),
      colorScheme: const ColorScheme.light(primary: Colors.white),
      useMaterial3: Platform.isAndroid,
    );
  }
}
